<template>
	<view class="ff">

		<!-- data:商品列表数组[{navtitle:标题 shop:[] 展示列表}] @itemClick:商品条目点击事件-->
		<cc-defineCateList ref="flmudel" :data="data" @itemClick="cateItemClick"
			style="margin-bottom: 50px;"></cc-defineCateList>
		<view class="empt">

		</view>
		<tabbarVue></tabbarVue>
	</view>
</template>

<script>
	import tabbarVue from '@/common/custom-tab-bar/custom-tab-bar.vue';
	export default {
		components: {
			tabbarVue
		},
		data() {
			return {
				data: [{
						navtitle: '精品推荐1',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '手机数码2',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '声学设备3',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '精品推荐4',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '手机数码5',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '手机数码6',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},
					{
						navtitle: '手机数码7',
						shop: [{
								shoptitle: "手机一",
								shopimage: "https://cdn.pixabay.com/photo/2014/08/05/10/27/iphone-410311_1280.jpg",
							},
							{
								shoptitle: "手机二",
								shopimage: "https://cdn.pixabay.com/photo/2015/05/12/09/13/social-media-763731_1280.jpg",
							},
							{
								shoptitle: "手机三",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							},
							{
								shoptitle: "手机四",
								shopimage: "https://cdn.pixabay.com/photo/2016/11/20/08/33/camera-1842202_1280.jpg",
							}
						]
					},

				]

			}
		},
		onShow() {
			this.$store.commit("changeTabbarIndex", 1)
			this.getfl({
				pageNo: 0,
				pageSize: 10,
			})
		},
		mounted() {

			// this.$refs.flmudel.getfl({
			// 	pageNo: 0,
			// 	pageSize: 10,
			// })

		},
		methods: {
			getfl(e) {
				this.$http.post('/serviceClassification/paginmdQueryfl2', e).then(res => {
					console.log('res', res.result);
					// this.fllistA = res.result.records
					// this.data = res.result.records
					this.data = res.result


				})
			},
			cateItemClick(item) {
				// console.log(item);
				this.$toPage("/otherPage/personnelList/personnelList", "id", item.id)
				// uni.showModal({
				// 	title: '点击条目',
				// 	content: '点击条目数据 = ' + JSON.stringify(item)
				// })
			}
		}
	}
</script>

<style lang="less">
	.ff {
		.empt {
			// background-color: aqua;
			width: 100%;
			height: 180px;
		}
	}
</style>